package com.niiwoo.civet.trade.dao.entity;

import java.math.BigDecimal;
import java.util.Date;

public class KaoLaRealRepayment {
    private Long id;

    private Long projectId;

    private String loanOrderId;

    private String serialNo;

    /**
     * 还款类型(3:正常还款,4:提前还款,5:逾期代偿,6:提前回购,7:逾期还款,8:严重逾期).
     */
    private Byte repayMethod;

    /**
     * 坏账还款拆分类型，1 逾期还款 （第一次还逾期的那一期），2 结清（第二次将坏账那期之后的所有结清）
     */
    private Byte badLoansRepayMethod;

    private String idCard;

    private Integer repayNo;

    private String repayDate;

    private BigDecimal repayAmount;

    private BigDecimal principal;

    private BigDecimal interest;

    private String payBankId;

    /**
     * 代扣协议Url地址
     */
    private String withholdingContract;

    private BigDecimal interestSplit;

    private BigDecimal damages;

    private BigDecimal overdueInterest;

    private BigDecimal principalPenalty;

    private BigDecimal interestPenalty;

    /**
     * 还款状态(0:处理中,1:还款失败,2:还款成功,3:还款异常).
     */
    private Byte niiwooRepayStatus;

    /**
     * 还款类型(1:正常还款,2:提前还款,3:代偿,4:逾期坏款,7:提前回购,8:考拉批扣).
     */
    private Byte repayType;

    /**
     * 债权转让协议url
     */
    private String creditorAttorn;

    /**
     * 还款请求结果(0:成功,非0:失败)
     */
    private Integer repayResultCode;

    private String repayResultTips;

    private Byte repayCallbackStatus;

    private String repayCallbackTips;

    /**
     * 用户是否主动还款(1:用户主动还款, 2:用户被动还款).
     */
    private Byte isPassive;

    private Date createTime;

    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getLoanOrderId() {
        return loanOrderId;
    }

    public void setLoanOrderId(String loanOrderId) {
        this.loanOrderId = loanOrderId;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public Byte getBadLoansRepayMethod() {
        return badLoansRepayMethod;
    }

    public void setBadLoansRepayMethod(Byte badLoansRepayMethod) {
        this.badLoansRepayMethod = badLoansRepayMethod;
    }


    public Byte getRepayMethod() {
        return repayMethod;
    }

    public void setRepayMethod(Byte repayMethod) {
        this.repayMethod = repayMethod;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public Integer getRepayNo() {
        return repayNo;
    }

    public void setRepayNo(Integer repayNo) {
        this.repayNo = repayNo;
    }

    public String getRepayDate() {
        return repayDate;
    }

    public void setRepayDate(String repayDate) {
        this.repayDate = repayDate;
    }

    public BigDecimal getRepayAmount() {
        return repayAmount;
    }

    public void setRepayAmount(BigDecimal repayAmount) {
        this.repayAmount = repayAmount;
    }

    public BigDecimal getPrincipal() {
        return principal;
    }

    public void setPrincipal(BigDecimal principal) {
        this.principal = principal;
    }

    public BigDecimal getInterest() {
        return interest;
    }

    public void setInterest(BigDecimal interest) {
        this.interest = interest;
    }

    public String getPayBankId() {
        return payBankId;
    }

    public void setPayBankId(String payBankId) {
        this.payBankId = payBankId;
    }

    public String getWithholdingContract() {
        return withholdingContract;
    }

    public void setWithholdingContract(String withholdingContract) {
        this.withholdingContract = withholdingContract;
    }

    public BigDecimal getInterestSplit() {
        return interestSplit;
    }

    public void setInterestSplit(BigDecimal interestSplit) {
        this.interestSplit = interestSplit;
    }

    public BigDecimal getDamages() {
        return damages;
    }

    public void setDamages(BigDecimal damages) {
        this.damages = damages;
    }

    public BigDecimal getOverdueInterest() {
        return overdueInterest;
    }

    public void setOverdueInterest(BigDecimal overdueInterest) {
        this.overdueInterest = overdueInterest;
    }

    public BigDecimal getPrincipalPenalty() {
        return principalPenalty;
    }

    public void setPrincipalPenalty(BigDecimal principalPenalty) {
        this.principalPenalty = principalPenalty;
    }

    public BigDecimal getInterestPenalty() {
        return interestPenalty;
    }

    public void setInterestPenalty(BigDecimal interestPenalty) {
        this.interestPenalty = interestPenalty;
    }

    public Byte getNiiwooRepayStatus() {
        return niiwooRepayStatus;
    }

    public void setNiiwooRepayStatus(Byte niiwooRepayStatus) {
        this.niiwooRepayStatus = niiwooRepayStatus;
    }

    public Byte getRepayType() {
        return repayType;
    }

    public void setRepayType(Byte repayType) {
        this.repayType = repayType;
    }

    public String getCreditorAttorn() {
        return creditorAttorn;
    }

    public void setCreditorAttorn(String creditorAttorn) {
        this.creditorAttorn = creditorAttorn;
    }

    public Integer getRepayResultCode() {
        return repayResultCode;
    }

    public void setRepayResultCode(Integer repayResultCode) {
        this.repayResultCode = repayResultCode;
    }

    public String getRepayResultTips() {
        return repayResultTips;
    }

    public void setRepayResultTips(String repayResultTips) {
        this.repayResultTips = repayResultTips;
    }

    public Byte getRepayCallbackStatus() {
        return repayCallbackStatus;
    }

    public void setRepayCallbackStatus(Byte repayCallbackStatus) {
        this.repayCallbackStatus = repayCallbackStatus;
    }

    public String getRepayCallbackTips() {
        return repayCallbackTips;
    }

    public void setRepayCallbackTips(String repayCallbackTips) {
        this.repayCallbackTips = repayCallbackTips;
    }

    public Byte getIsPassive() {
        return isPassive;
    }

    public void setIsPassive(Byte isPassive) {
        this.isPassive = isPassive;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 还款类型枚举：3：正常还款、4：提前还款、5：逾期代偿 6: 回购
     */
    public enum RepayMethodEnum {
        NORMAL_REPAY((byte) 3, "正常还款"),
        PRE_REPAY((byte) 4, "提前还款"),
        OVERDUE_COMP((byte) 5, "逾期代偿"),
        BUYBACK_REPAY((byte) 6, "考拉回购"),
        OVERDUE_REPAY((byte) 7, "逾期还款"),
        BAD_DEBT_REPAY((byte) 8, "严重逾期还款"),
        REPAY_BATCHPAYMENT((byte) 9, "考拉批扣");

        private Byte type;
        private String desc;

        RepayMethodEnum(Byte type, String desc) {
            this.type = type;
            this.desc = desc;
        }

        public Byte getType() {
            return type;
        }

        public void setType(Byte type) {
            this.type = type;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     * 还款状态枚举：0 处理中，1 还款失败 2 还款成功
     */
    public enum NiiwooStatusEnum {
        IN_HAND((byte) 0, "处理中"),
        REPAY_FAILED((byte) 1, "还款失败"),
        REPAY_SUCCESS((byte) 2, "还款成功"),
        REPAY_ABNOMAL((byte) 3, "还款异常");

        private Byte status;
        private String desc;

        NiiwooStatusEnum(Byte status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public Byte getStatus() {
            return status;
        }

        public void setStatus(Byte status) {
            this.status = status;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     * 还款请求结果枚举:0成功 非0失败
     */
    public enum RepayCodeEnum {
        SUCCESS(0, "成功");

        private Integer status;
        private String desc;

        RepayCodeEnum(Integer status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public Integer getStatus() {
            return status;
        }

        public void setStatus(Integer status) {
            this.status = status;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }

    /**
     * 还款回调状态：4失败 5成功
     */
    public enum RepayStatusEnum {
        SUCCESS(5, "成功"),
        FAILED(4, "失败");

        private Integer status;
        private String desc;

        public static RepayStatusEnum enumOf(Integer code) {
            for (RepayStatusEnum repayStatus : values()) {
                if (repayStatus.status.equals(code)) {
                    return repayStatus;
                }
            }
            return null;
        }

        RepayStatusEnum(Integer status, String desc) {
            this.status = status;
            this.desc = desc;
        }

        public Integer getStatus() {
            return status;
        }

        public void setStatus(Integer status) {
            this.status = status;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }
    }
}